3.11.42 \(\int \frac {x^{-1+2 n}}{(a+b x^n) (c+d x^n)} \, dx\) [1042]

Optimal. Leaf size=54 \[ -\frac {a \log \left (a+b x^n\right )}{b (b c-a d) n}+\frac {c \log \left (c+d x^n\right )}{d (b c-a d) n} \]

[Out]

-a*ln(a+b*x^n)/b/(-a*d+b*c)/n+c*ln(c+d*x^n)/d/(-a*d+b*c)/n

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {457, 78} \begin {gather*} \frac {c \log \left (c+d x^n\right )}{d n (b c-a d)}-\frac {a \log \left (a+b x^n\right )}{b n (b c-a d)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^(-1 + 2*n)/((a + b*x^n)*(c + d*x^n)),x]

[Out]

-((a*Log[a + b*x^n])/(b*(b*c - a*d)*n)) + (c*Log[c + d*x^n])/(d*(b*c - a*d)*n)

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {x^{-1+2 n}}{\left (a+b x^n\right ) \left (c+d x^n\right )} \, dx &=\frac {\text {Subst}\left (\int \frac {x}{(a+b x) (c+d x)} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (-\frac {a}{(b c-a d) (a+b x)}+\frac {c}{(b c-a d) (c+d x)}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {a \log \left (a+b x^n\right )}{b (b c-a d) n}+\frac {c \log \left (c+d x^n\right )}{d (b c-a d) n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 44, normalized size = 0.81 \begin {gather*} -\frac {a d \log \left (a+b x^n\right )-b c \log \left (c+d x^n\right )}{b^2 c d n-a b d^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + 2*n)/((a + b*x^n)*(c + d*x^n)),x]

[Out]

-((a*d*Log[a + b*x^n] - b*c*Log[c + d*x^n])/(b^2*c*d*n - a*b*d^2*n))

________________________________________________________________________________________

Maple [A]
time = 0.40, size = 59, normalized size = 1.09

method result size
norman \(\frac {a \ln \left (a +b \,{\mathrm e}^{n \ln \left (x \right )}\right )}{\left (a d -b c \right ) b n}-\frac {c \ln \left (c +d \,{\mathrm e}^{n \ln \left (x \right )}\right )}{d n \left (a d -b c \right )}\) \(59\)
risch \(\frac {\ln \left (x \right )}{b d}+\frac {\ln \left (x \right ) c}{d \left (a d -b c \right )}-\frac {\ln \left (x \right ) a}{\left (a d -b c \right ) b}-\frac {c \ln \left (x^{n}+\frac {c}{d}\right )}{d n \left (a d -b c \right )}+\frac {a \ln \left (x^{n}+\frac {a}{b}\right )}{\left (a d -b c \right ) b n}\) \(103\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+2*n)/(a+b*x^n)/(c+d*x^n),x,method=_RETURNVERBOSE)

[Out]

a/(a*d-b*c)/b/n*ln(a+b*exp(n*ln(x)))-c/d/n/(a*d-b*c)*ln(c+d*exp(n*ln(x)))

________________________________________________________________________________________

Maxima [A]
time = 0.32, size = 60, normalized size = 1.11 \begin {gather*} -\frac {a \log \left (\frac {b x^{n} + a}{b}\right )}{b^{2} c n - a b d n} + \frac {c \log \left (\frac {d x^{n} + c}{d}\right )}{b c d n - a d^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)/(a+b*x^n)/(c+d*x^n),x, algorithm="maxima")

[Out]

-a*log((b*x^n + a)/b)/(b^2*c*n - a*b*d*n) + c*log((d*x^n + c)/d)/(b*c*d*n - a*d^2*n)

________________________________________________________________________________________

Fricas [A]
time = 2.75, size = 45, normalized size = 0.83 \begin {gather*} -\frac {a d \log \left (b x^{n} + a\right ) - b c \log \left (d x^{n} + c\right )}{{\left (b^{2} c d - a b d^{2}\right )} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)/(a+b*x^n)/(c+d*x^n),x, algorithm="fricas")

[Out]

-(a*d*log(b*x^n + a) - b*c*log(d*x^n + c))/((b^2*c*d - a*b*d^2)*n)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+2*n)/(a+b*x**n)/(c+d*x**n),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+2*n)/(a+b*x^n)/(c+d*x^n),x, algorithm="giac")

[Out]

integrate(x^(2*n - 1)/((b*x^n + a)*(d*x^n + c)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {x^{2\,n-1}}{\left (a+b\,x^n\right )\,\left (c+d\,x^n\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(2*n - 1)/((a + b*x^n)*(c + d*x^n)),x)

[Out]

int(x^(2*n - 1)/((a + b*x^n)*(c + d*x^n)), x)

________________________________________________________________________________________